#bin_SCRIPTS= \
#	startxfce4 \
#	xflock4
#
## cannot be set from configure, because ${prefix} is not expanded
#edit = $(SED) \
#	-e "s,@_datadir_\@,$(datadir),g" \
#	-e "s,@_libdir_\@,$(libdir),g" \
#	-e "s,@_docdir_\@,$$(dirname $(docdir)),g" \
#	-e "s,@_sysconfdir_\@,$(sysconfdir),g"
#
#startxfce4: Makefile $(srcdir)/startxfce4.in
#	rm -f startxfce4 startxfce4.tmp
#	$(edit) $(srcdir)/startxfce4.in >startxfce4.tmp
#	mv startxfce4.tmp startxfce4

set(_datadir_ ${CMAKE_INSTALL_DATADIR})
set(_libdir_ ${CMAKE_INSTALL_LIBDIR})
set(_docdir_ ${CMAKE_INSTALL_DOCDIR})
set(_sysconfdir_ /etc)
configure_file(
        ${CMAKE_CURRENT_SOURCE_DIR}/startvvxfce4.in
        ${CMAKE_CURRENT_BINARY_DIR}/startvvxfce4
        @ONLY
)

install(PROGRAMS
        ${CMAKE_CURRENT_BINARY_DIR}/startvvxfce4
        DESTINATION bin
)

set(_vvxfce4-session_ ${CMAKE_INSTALL_PREFIX}/bin/${PROJECT_NAME})
configure_file(
        ${CMAKE_CURRENT_SOURCE_DIR}/xinitrc.in
        ${CMAKE_CURRENT_BINARY_DIR}/xinitrc
        @ONLY
)

install(FILES
        ${CMAKE_CURRENT_BINARY_DIR}/xinitrc
        DESTINATION /etc/xdg/vvxfce4
)
#
#xinitrc: Makefile xinitrc.in
#	rm -f xinitrc xinitrc.tmp
#	$(edit) xinitrc.in >xinitrc.tmp
#	mv xinitrc.tmp xinitrc
#
#conffilesdir=@sysconfdir@/xdg/xfce4
#conffiles_DATA = \
#	xinitrc \
#	Xft.xrdb
#
#autostartdir = $(sysconfdir)/xdg/autostart
#autostart_in_files = xscreensaver.desktop.in
#autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
#@INTLTOOL_DESKTOP_RULE@
#
#EXTRA_DIST = \
#	$(autostart_in_files) \
#	startxfce4.in \
#	xinitrc.in \
#	Xft.xrdb \
#	xflock4
#
#DISTCLEANFILES = \
#	$(autostart_DATA) \
#	startxfce4 \
#	xinitrc
